import { defineConfig } from 'vite';
import WindiCSS from 'vite-plugin-windicss';
import react from '@vitejs/plugin-react';
import * as path from 'path';
// https://vitejs.dev/config/
function resolve(dir) {
  return path.join(__dirname, '.', dir);
}
export default defineConfig({
  plugins: [react(), WindiCSS()],
  resolve: {
    alias: {
      '/@': resolve('src'),
    },
    extensions: ['.tsx', '.jsx', '.ts', '.js'],
  },
  css: {
    preprocessorOptions: {
      less: {
        javascriptEnabled: true,
        charset: false,
      },
    },
  },
  server: {
    host: '0.0.0.0',
  },
});
